import * as vue from "vue";
import request from '@/config/axios'
import * as elementPlus from 'element-plus'
import * as formatTime from '@/utils/formatTime'
import * as my18n from '@/utils/my18n'
import * as lodash from 'lodash-es'

const libs = {
    vue,
    '@/config/axios': request,
    'element-plus': elementPlus,
    '@/utils/formatTime': formatTime,
    'lodash-es': lodash,
    '@/utils/my18n': my18n,
}

window.___magic__import__ = function(lib, name){
    if(Object.prototype.toString.call(libs[lib]) != '[object Module]' && name == '*'){
        return libs[lib]
    }
    return (libs[lib] || {})[name]
}

window.cmpFuncWrap = {}